﻿@model KPIS.GERP.Models.ICM.Movement

@{
    ViewBag.Title = "โอนย้าย";
    ViewBag.Descr = "แก้ไขข้อมูลการโอนย้าย";
}

@using (Html.BeginForm("Edit", "Movement", FormMethod.Post, new { @class = "form-horizontal" }))
{
    @Html.AntiForgeryToken()

    <div class="block-button-menu-above">
        <input type="submit" value="บันทึก" class="btn btn-small btn-success" />&nbsp;&nbsp;
        <input type="button" value="ยกเลิก" class="btn btn-small btn-danger" onclick="window.location.href = '../Index'" />
    </div>
    
    @Html.ValidationSummary(true)
    @Html.Partial("_EditorForm")
    @Html.HiddenFor(model => model.ResTypeId)    
    @Html.HiddenFor(model => model.MoveMethod) 
    @Html.HiddenFor(model => model.SourceJobSiteId)
    @Html.HiddenFor(model => model.SourceWarehouseId)
    @Html.HiddenFor(model => model.DestinationWarehouseId)
}

@section scripts
{
    <script type="text/javascript">
        $(document).ready(function () {
           
            if ($("#Method0").is(':checked')) {
                $("#GroupWh").show();
                $("#GroupDes").hide();
            }else {
                $("#GroupDes").show();
                $("#GroupWh").hide();
               
            }
                
            $("#ResTypeId").attr("disabled", "disabled");
            $("#controls").attr("disabled", "disabled");
            $("#edit-diable1").find('*').prop("disabled", "disabled");
        });

    </script>
}